package com.yeban.javase.day01.test02;

/**
 * @Desc TODO
 * @Author yeban
 * @Date 2025/10/9
 */

// 姓名，在位时间，政绩，描述
public class Emperor {

    private String name;            // 姓名
    private String reignPeriod;     // 在位时间
    private String politicalAchievements;       // 政绩
    private String description;     // 描述

    public Emperor() {
    }

    public Emperor(String name, String reignPeriod, String politicalAchievements, String description) {
        this.name = name;
        this.reignPeriod = reignPeriod;
        this.politicalAchievements = politicalAchievements;
        this.description = description;
    }

    public void show() {
        System.out.println("姓名: " + name);
        System.out.println("在位时间: " + reignPeriod);
        System.out.println("政绩：\n" + politicalAchievements);
        System.out.println("描述：\n" + description);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getReignPeriod() {
        return reignPeriod;
    }

    public void setReignPeriod(String reignPeriod) {
        this.reignPeriod = reignPeriod;
    }

    public String getPoliticalAchievements() {
        return politicalAchievements;
    }

    public void setPoliticalAchievements(String politicalAchievements) {
        this.politicalAchievements = politicalAchievements;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
